<template>
    <div class="useVModel">
        <h1>这是父组件</h1>
        <div>value的值：{{ label }}</div>
        <el-button @click="label++">+1</el-button>
        <!--        <el-input v-model="label"></el-input>-->
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <h1>这是子组件</h1>
        <Children :label.sync="label"></Children>
    </div>
</template>

<script>
import Children from "@/view/useVModel/components/children.vue";

export default {
    name: "useVModel",
    components: {Children},
    data() {
        return {
            label: 1,
        }
    }
}
</script>

<style scoped lang="less">

</style>
